package landun.pojo;

public class Page {
    private Integer pageSize = 5;
    private Integer totalPageCount=0;
    private Integer currentPageNo=0;
    private Integer totalRecordCount=0;

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        if (pageSize>0)
            this.pageSize = pageSize;
    }

    public Integer getTotalPageCount() {
        return totalPageCount;
    }

    public void setTotalPageCount(Integer totalPageCount) {
        this.totalPageCount = totalPageCount;
    }

    public Integer getCurrentPageNo() {
        return currentPageNo;
    }

    public void setCurrentPageNo(Integer currentPageNo) {
        this.currentPageNo = currentPageNo;
    }

    public Integer getTotalRecordCount() {
        return totalRecordCount;
    }

    public void setTotalRecordCount(Integer totalRecordCount) {
        this.totalRecordCount = totalRecordCount;
        totalPageCount=totalRecordCount%pageSize==0?totalRecordCount/pageSize:totalRecordCount/pageSize+1;
    }
}
